<?php $this->load->view('tourism/layout/header')?>
<?php js('skins/tourism', 'shop','20160518')?>
<div class="page-1">
    <div class="brand-head flex">
        <a href="javascript:goHistoryBack();" class="brand-return brand-active">
            <i class="iconfont icon-zuojiantou"></i>
        </a>
        <div class="search-input flex flex-1">
            <i class="iconfont icon-sousuo"></i>
            <div class="search-key flex-1">
                请输入关键字
            </div>
        </div>
        <div class="brand-return">
            <a href="javascript:;" class="drop-down-click">
                <i class="iconfont icon-shouye"></i>
            </a>
        </div>
    </div>
    <div class="widthMax"> 
        <div class="brand-home">
            <div class="am-slider am-slider-default beizhu-home shop-home" data-am-slider='{}' data-am-flexslider="{playAfterPaused:500}" data-am-widget="slider">
                <ul class="am-slides">
                    <?php foreach ($advert->result() as $val):?>
                        <li>
                            <a href="<?php echo $val->openvar;?>">
                                <img src=<?php echo $this->config->show_image_url($val->picture, '300-300')?> />
                            </a>
                        </li>
                    <?php endforeach;?>
                </ul>
            </div>
        </div>
        <div class="brand-choice flex scrollspy-nav" data-am-sticky>
            <div class="brand-scroll am-scrollable-horizontal flex-1">
                <ul class="am-cf">
                    <li <?php if(empty($category_id)):?>class="active"<?php endif;?>>
                        <a href="<?php echo site_url('tourism/shop/ajaxShop');?>">
                            全部
                        </a>
                    </li>
                    <?php $i=0; foreach ($category->result() as $item):?>
                    <?php if($i>6) break;?>
                    <li>
                        <a href="<?php echo site_url('tourism/shop/ajaxShop').'?category_id='.$item->id;?>">
                            <?php echo $item->name;?>
                        </a>
                    </li>
                    <?php $i++; endforeach;?>
                </ul>
            </div>
            <div class="brand-mose">
                <i class="iconfont icon-classify"></i>
                <div class="brand-down">
                    <ul class="am-cf">
                        <?php foreach ($category->result() as $item):?>
                        <li>
                            <a href="<?php echo site_url('tourism/shop/ajaxShop').'?category_id='.$item->id;?>"><?php echo $item->name;?></a>
                        </li>
                        <?php endforeach;?>
                    </ul>
                </div>
            </div>
        </div>
        <div class="brand-list">
             <div class="load-logo">
                <img src="/skins/home/images/tert.gif">
             </div>
            <ul class="shop-list">
                <?php $this->load->view('tourism/shop/shoplist')?>
            </ul>
            <div class="sec-load <?php if(!$pg_flag):?>am-hide<?php endif;?>" pg="<?php echo $pg;?>" id="my-scrollspy">
                <i class="iconfont am-animation-spin icon-jiazaizhong"></i>
            </div>
            <div class="no-more am-hide">
                没有更多了
            </div>
        </div>
    </div>
</div>
<div class="page-2 am-hide">
    <div class="boost-head flex">
        <div class="boost-left flex flex-1">
            <div class="boost-pull am-dropdown" data-am-dropdown>
                <p class="boost-shop am-dropdown-toggle" data-am-dropdown-toggle>
                       站点
                </p>
                <!-- 
                <ul class="boost-content am-dropdown-content">
                    <li class="active">站点</li>
                    <li>商品</li>
                </ul>
                 -->
            </div>
            <form method="get" action="<?php echo site_url('tourism/shop/grid');?>">
                <div class="boost-input flex-1">
                    <input type="text" placeholder="请输入关键字" name="keyword" value="<?php echo $this->input->get('keyword');?>"/>
                    <input type="hidden" name="flag" value="1" />
                </div>
            </form>
        </div>
        <div class="boost-colse">
            取消
        </div>
    </div>
    <div class="boost-sion widthMax">
        <?php $history=unserialize(get_cookie('historySearch'));if($history):?>
        <div class="history-search">
            <h6>历史搜索</h6>
            <div class="sion-list">
                <ul>
                    <?php foreach ($history as $item):?>
                    <?php if($item['type']==2):?>
                    <li>
                        <a href="<?php echo site_url('tourism/shop/grid').'?keyword='.$item['keyword'];?>" class="flex">
                            <h5><?php echo $item['keyword'];?></h5>
                            <!--<p class="flex-1 am-text-truncate">主营：</p>-->
                        </a>
                    </li>
                    <?php endif;?>
                    <?php endforeach;?>
                </ul>
                <a href="javascript:;" class="sion-clear clear-cookie">
                    清除搜索历史
                </a>
            </div>
        </div>
        <?php endif;?>
        <h6>热门搜索</h6>
        <div class="sion-list">
            <ul>
                <li>
                    <a href="<?php echo $this->config->wap_base_url.'3526437/tourism/tourismprovider/grid.html';?>" class="flex">
                        <h5>云倚贸易1站通</h5>
                    </a>
                </li>
                <li>
                    <a href="<?php echo $this->config->wap_base_url.'3528791/tourism/tourismprovider/grid.html';?>" class="flex">
                        <h5>龙泉市水月岛瓷艺坊</h5>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="am-dimmer am-active"></div>
<?php $this->load->view('tourism/layout/footer')?>